var Action = require("../apiaction");
var Utility = require("../Utility/utility.js");
exports.mallRouter = function(router){


    /*
     *  材料类别
     */
    router.all('/mall/mall_material_type',function(req,res){


        Utility.getMenuList(req,res,function(menulist) {
            res.render('mall/mall_material_type', {
                layout: 'pte/layout-pte',
                active: 'mall_material_type',
                jscript: 'mall/mall_material_type',
                menulist:menulist,
                comparam:Utility.returnCommonParam(req,res)
            })

        });

    });

    /*
    * 二级材料
    */
    router.all('/mall/mall_material',function(req,res){


            Utility.getMenuList(req,res,function(menulist) {
                res.render('mall/mall_material', {
                    layout: 'pte/layout-pte',
                    active: 'mall_material',
                    jscript: 'mall/mall_material',
                    menulist:menulist,
                    comparam:Utility.returnCommonParam(req,res)
                })

            });

        });

    /*
    *商品属性
    */
    router.all('/mall/mall_attr',function(req,res){


            Utility.getMenuList(req,res,function(menulist) {
                res.render('mall/mall_attr', {
                    layout: 'pte/layout-pte',
                    active: 'mall_attr',
                    jscript: 'mall/mall_attr',
                    menulist:menulist,
                    comparam:Utility.returnCommonParam(req,res)
                })

            });

        });


    /*
     *商品属性内容
     */
    router.all('/mall/mall_attr_content',function(req,res){


        Utility.getMenuList(req,res,function(menulist) {
            res.render('mall/mall_attr_content', {
                layout: 'pte/layout-pte',
                active: 'mall_attr_content',
                jscript: 'mall/mall_attr_content',
                menulist:menulist,
                comparam:Utility.returnCommonParam(req,res)
            })

        });

    });

    /*
     *商品属性模板
     */
    router.all('/mall/mallTemplate',function(req,res){


        Utility.getMenuList(req,res,function(menulist) {
            res.render('mall/mallTemplate', {
                layout: 'pte/layout-pte',
                active: 'mallTemplate',
                jscript: 'mall/mallTemplate',
                menulist:menulist,
                comparam:Utility.returnCommonParam(req,res)
            })

        });

    });

    /*
     *商品品牌
     */
    router.all('/mall/mall_brands',function(req,res){


        Utility.getMenuList(req,res,function(menulist) {
            res.render('mall/mall_brands', {
                layout: 'pte/layout-pte',
                active: 'mall_brands',
                jscript: 'mall/mall_brands',
                menulist:menulist,
                comparam:Utility.returnCommonParam(req,res)
            })

        });

    });


    /*
     *品牌对应材料
     */
    router.all('/mall/mall_brands_material',function(req,res){


        Utility.getMenuList(req,res,function(menulist) {
            res.render('mall/mall_brands_material', {
                layout: 'pte/layout-pte',
                active: 'mall_brands_material',
                jscript: 'mall/mall_brands_material',
                menulist:menulist,
                comparam:Utility.returnCommonParam(req,res)
            })

        });

    });


    /*
     *商铺
     */
    router.all('/mall/mallshop',function(req,res){


        Utility.getMenuList(req,res,function(menulist) {
            res.render('mall/mallshop', {
                layout: 'pte/layout-pte',
                active: 'mallshop',
                jscript: 'mall/mallshop',
                menulist:menulist,
                comparam:Utility.returnCommonParam(req,res)
            })

        });

    });

    /*
     *商品
     */
    router.all('/mall/mallgoods',function(req,res){


        Utility.getMenuList(req,res,function(menulist) {
            res.render('mall/mallgoods', {
                layout: 'pte/layout-pte',
                active: 'mallgoods',
                jscript: 'mall/mallgoods',
                menulist:menulist,
                comparam:Utility.returnCommonParam(req,res)
            })

        });

    });

    //商品-规格
    /*
    *
    */
    router.all('/mall/mallspecs',function(req,res){


            Utility.getMenuList(req,res,function(menulist) {
                res.render('mall/mallspecs', {
                    layout: 'pte/layout-pte',
                    active: 'mallspecs',
                    jscript: 'mall/mallspecs',
                    menulist:menulist,
                    comparam:Utility.returnCommonParam(req,res)
                })

            });

        });

    /*
    *
    */
    router.all('/mall/mallattrs',function(req,res){


            Utility.getMenuList(req,res,function(menulist) {
                res.render('mall/mallattrs', {
                    layout: 'pte/layout-pte',
                    active: 'mallattrs',
                    jscript: 'mall/mallattrs',
                    menulist:menulist,
                    comparam:Utility.returnCommonParam(req,res)
                })

            });

        });


     /*
     *
     */
     router.all('/mall/mallspecsattr',function(req,res){


             Utility.getMenuList(req,res,function(menulist) {
                 res.render('mall/mallspecsattr', {
                     layout: 'pte/layout-pte',
                     active: 'mallspecsattr',
                     jscript: 'mall/mallspecsattr',
                     menulist:menulist,
                     comparam:Utility.returnCommonParam(req,res)
                 })

             });

         });




}